package entities;

import java.util.Random;

public class Unit {
	public enum UnitType {
		Generic, Player, Enemy, Projectile
	}
	
	protected static Random random = new Random();
	protected UnitType unitType = UnitType.Generic;
	protected float x,y;
	
	public UnitType getType() {
		return unitType;
	}
	
	public float getX() {
		return x;
	}
	
	public float getY() {
		return y;
	}
	
	public float distanceToEnemySqr(Unit other) {
		float dx = x - other.x;
		float dy = y - other.y;
		return dx * dx + dy * dy;
	}
	
}
